Skip to content

feat(UI): add blob page#1075

Merged
benjamin-747 merged 2 commits into
gitmono-dev:mainfrom
yumeowo:main
May 29, 2025
Merged

feat(UI): add blob page#1075
benjamin-747 merged 2 commits into
gitmono-dev:mainfrom
yumeowo:main

Conversation

@yumeowo

@yumeowo yumeowo commented May 29, 2025

Copy link
Copy Markdown
Contributor

#1071
Temporarily migrate components from the /archieved/moon. The next step is to investigate new component replacement solutions.

@vercel

vercel Bot commented May 29, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mega ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2025 10:29am

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new “blob” page for displaying file contents and migrates several code-view components from the archived /archived/moon folder.

  • Introduces BlobPage under pages/[org]/code/blob/[...path].tsx with layout and data-fetching via useGetBlob
  • Migrates and wires up code-view/editor components (CodeContent, Editor, ExampleTheme, CodeTable)
  • Updates dependencies (@lexical/*, prism-react-renderer) and adds a LICENSE for Bootstrap Icons

Reviewed Changes

Copilot reviewed 45 out of 46 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
moon/apps/web/public/icons/LICENSE.md Added Bootstrap Icons license
moon/apps/web/pages/[org]/code/blob/[...path].tsx New BlobPage component with layout and blob-fetching hook
moon/apps/web/package.json Added Lexical and Prism dependencies
moon/apps/web/hooks/useGetBlob.ts New useGetBlob hook using React Query
moon/apps/web/components/CodeView/CodeTable.tsx Updated file-navigation logic to construct blob URLs
moon/apps/web/components/CodeView/BlobView/ExampleTheme.js Added theme mapping for Lexical editor
moon/apps/web/components/CodeView/BlobView/Editor.tsx Introduced Lexical-based inline editor plugin
moon/apps/web/components/CodeView/BlobView/CodeContent.tsx Migrated code rendering with Prism and inline comment editor
moon/apps/web/components/CodeView/BlobView/CodeContent.module.css Added CSS for code view, including unused .fileCodeContainer
archived/moon/.env.local Updated MEGA_HOST and MEGA_INTERNAL_HOST
Files not reviewed (1)
  • moon/pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

moon/apps/web/pages/[org]/code/blob/[...path].tsx:12

  • Use camelCase for variable names in JS/TS; rename new_path to newPath to match project conventions.
const new_path = '/' + path.join('/')

moon/apps/web/components/CodeView/BlobView/CodeContent.tsx:12

  • The prop type annotation is incorrect. You should destructure an object of shape { fileContent: string }, e.g. ({ fileContent }: { fileContent: string }).
const CodeContent = ({ fileContent }: string) => {

Comment thread moon/apps/web/pages/[org]/code/blob/[...path].tsx Outdated
Comment thread moon/apps/web/components/CodeView/BlobView/CodeContent.tsx Outdated
Comment thread moon/apps/web/components/CodeView/BlobView/CodeContent.module.css Outdated
@benjamin-747
benjamin-747 added this pull request to the merge queue May 29, 2025
Merged via the queue into gitmono-dev:main with commit ce5ee03 May 29, 2025
@benjamin-747 benjamin-747 added this to the 0.2.0 - Web UI milestone May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants